class A:
    def __init__(self, txt: str):
        self.t: B = None
        self.y: C = None
        self.w: E = None
        self.p: H = None
        self.o: C = None
        self.r: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.t: I = None
        self.p: B = None
        self.r: H = None
        self.u: E = None
        self.x: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: B = None
        self.q: G = None
        self.r: H = None
        self.o: B = None
        self.x: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: H = None
        self.o: A = None
        self.q: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: I = None
        self.r: E = None
        self.v: B = None
        self.z: G = None
        self.u: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: C = None
        self.y: C = None
        self.x: H = None
        self.p: B = None
        self.q: F = None
        self.z: F = None
        self.s: H = None
        self.w: C = None
        self.u: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.t: I = None
        self.p: B = None
        self.r: H = None
        self.u: E = None
        self.x: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: B = None
        self.q: G = None
        self.r: H = None
        self.o: B = None
        self.x: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: H = None
        self.o: A = None
        self.q: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: I = None
        self.r: E = None
        self.v: B = None
        self.z: G = None
        self.u: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: C = None
        self.y: C = None
        self.x: H = None
        self.p: B = None
        self.q: F = None
        self.z: F = None
        self.s: H = None
        self.w: C = None
        self.u: F = None
        self.txt = txt

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

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