class A:
    def __init__(self, txt: str):
        self.t: H = None
        self.s: B = None
        self.p: G = None
        self.v: C = None
        self.w: B = None
        self.z: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: H = None
        self.r: G = None
        self.p: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.o: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: G = None
        self.y: F = None
        self.v: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.x: G = None
        self.r: C = None
        self.o: C = None
        self.y: A = None
        self.u: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: I = None
        self.q: A = None
        self.s: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: F = None
        self.w: F = None
        self.v: E = None
        self.z: F = None
        self.x: B = None
        self.r: B = None
        self.t: E = None
        self.q: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: F = None
        self.t: C = None
        self.r: G = None
        self.z: A = None
        self.o: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: C = None
        self.v: C = None
        self.w: E = None
        self.z: D = None
        self.o: G = None
        self.txt = txt

n = A("n")
h = B("h")
c = C("c")
f = D("f")
m = E("m")
i = F("i")
g = G("g")
k = H("k")
j = I("j")

n.t = k
n.z = k
n.s = h
n.w = h
n.p = g
n.v = c
h.w = k
h.r = g
h.p = i
c.t = m
c.o = k
f.q = g
f.y = i
f.v = i
m.t = i
m.x = g
m.u = g
m.r = c
m.o = c
m.y = n
i.w = j
i.q = n
i.s = h
g.p = i
g.w = i
g.z = i
g.v = m
g.t = m
g.q = m
g.x = h
g.r = h
k.q = i
k.o = i
k.t = c
k.r = g
k.z = n
j.p = c
j.v = c
j.w = m
j.z = f
j.o = g
assert k.t.o.t.txt == "
class A:
    def __init__(self, txt: str):
        self.t: H = None
        self.s: B = None
        self.p: G = None
        self.v: C = None
        self.w: B = None
        self.z: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: H = None
        self.r: G = None
        self.p: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.o: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: G = None
        self.y: F = None
        self.v: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.x: G = None
        self.r: C = None
        self.o: C = None
        self.y: A = None
        self.u: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: I = None
        self.q: A = None
        self.s: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: F = None
        self.w: F = None
        self.v: E = None
        self.z: F = None
        self.x: B = None
        self.r: B = None
        self.t: E = None
        self.q: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: F = None
        self.t: C = None
        self.r: G = None
        self.z: A = None
        self.o: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: C = None
        self.v: C = None
        self.w: E = None
        self.z: D = None
        self.o: G = None
        self.txt = txt

n = A("n")
h = B("h")
c = C("c")
f = D("f")
m = E("m")
i = F("i")
g = G("g")
k = H("k")
j = I("j")

n.t = k
n.z = k
n.s = h
n.w = h
n.p = g
n.v = c
h.w = k
h.r = g
h.p = i
c.t = m
c.o = k
f.q = g
f.y = i
f.v = i
m.t = i
m.x = g
m.u = g
m.r = c
m.o = c
m.y = n
i.w = j
i.q = n
i.s = h
g.p = i
g.w = i
g.z = i
g.v = m
g.t = m
g.q = m
g.x = h
g.r = h
k.q = i
k.o = i
k.t = c
k.r = g
k.z = n
j.p = c
j.v = c
j.w = m
j.z = f
j.o = g
assert k.t.o.t.txt == "c"