class A:
    def __init__(self, txt: str):
        self.q: F = None
        self.u: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: I = None
        self.u: E = None
        self.r: H = None
        self.y: E = None
        self.p: F = None
        self.w: A = None
        self.x: A = None
        self.t: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.y: D = None
        self.x: I = None
        self.u: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: I = None
        self.v: C = None
        self.s: G = None
        self.q: F = None
        self.y: F = None
        self.u: A = None
        self.r: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.x: B = None
        self.u: I = None
        self.t: G = None
        self.o: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: C = None
        self.r: G = None
        self.p: C = None
        self.txt = txt

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

h.q = i
h.u = c
e.z = g
e.u = f
e.y = f
e.t = f
e.r = a
e.p = i
e.w = h
e.x = h
c.w = i
c.y = b
c.x = g
c.u = h
b.o = g
b.v = c
b.r = c
b.s = k
b.q = i
b.y = i
b.u = h
f.v = c
f.x = e
f.u = g
f.t = k
f.o = a
i.u = c
k.y = c
a.s = i
a.w = i
a.t = i
a.o = i
a.q = c
a.p = e
a.u = g
a.x = h
a.y = k
g.s = c
g.p = c
g.r = k
assert a.t.u.u.u.w.txt == "
class A:
    def __init__(self, txt: str):
        self.q: F = None
        self.u: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: I = None
        self.u: E = None
        self.r: H = None
        self.y: E = None
        self.p: F = None
        self.w: A = None
        self.x: A = None
        self.t: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.y: D = None
        self.x: I = None
        self.u: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: I = None
        self.v: C = None
        self.s: G = None
        self.q: F = None
        self.y: F = None
        self.u: A = None
        self.r: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.x: B = None
        self.u: I = None
        self.t: G = None
        self.o: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: C = None
        self.r: G = None
        self.p: C = None
        self.txt = txt

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

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