class A:
    def __init__(self, txt: str):
        self.t: B = None
        self.r: C = None
        self.u: G = None
        self.z: B = None
        self.p: F = None
        self.o: C = None
        self.v: F = None
        self.x: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: G = None
        self.s: D = None
        self.t: F = None
        self.o: G = None
        self.y: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.t: E = None
        self.p: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: H = None
        self.y: C = None
        self.v: G = None
        self.r: F = None
        self.p: G = None
        self.s: G = None
        self.x: B = None
        self.t: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

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

l = A("l")
e = B("e")
b = C("b")
k = D("k")
d = E("d")
g = F("g")
j = G("j")
c = H("c")

l.t = e
l.z = e
l.r = b
l.o = b
l.u = j
l.p = g
l.v = g
l.x = k
e.q = j
e.o = j
e.s = k
e.t = g
e.y = g
b.w = k
b.t = d
b.p = g
k.u = c
k.y = b
k.v = j
k.p = j
k.s = j
k.r = g
k.t = g
k.x = e
d.o = c
d.r = j
g.o = e
j.p = l
c.s = e
assert b.w.t.o.s.u.txt == "
class A:
    def __init__(self, txt: str):
        self.t: B = None
        self.r: C = None
        self.u: G = None
        self.z: B = None
        self.p: F = None
        self.o: C = None
        self.v: F = None
        self.x: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: G = None
        self.s: D = None
        self.t: F = None
        self.o: G = None
        self.y: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.t: E = None
        self.p: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: H = None
        self.y: C = None
        self.v: G = None
        self.r: F = None
        self.p: G = None
        self.s: G = None
        self.x: B = None
        self.t: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

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

l = A("l")
e = B("e")
b = C("b")
k = D("k")
d = E("d")
g = F("g")
j = G("j")
c = H("c")

l.t = e
l.z = e
l.r = b
l.o = b
l.u = j
l.p = g
l.v = g
l.x = k
e.q = j
e.o = j
e.s = k
e.t = g
e.y = g
b.w = k
b.t = d
b.p = g
k.u = c
k.y = b
k.v = j
k.p = j
k.s = j
k.r = g
k.t = g
k.x = e
d.o = c
d.r = j
g.o = e
j.p = l
c.s = e
assert b.w.t.o.s.u.txt == "c"