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

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.y: H = None
        self.s: E = None
        self.p: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.s: B = None
        self.o: C = None
        self.t: D = None
        self.z: B = None
        self.x: A = None
        self.y: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.u: H = None
        self.x: E = None
        self.v: D = None
        self.o: B = None
        self.q: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: B = None
        self.r: D = None
        self.s: E = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.y: H = None
        self.s: E = None
        self.p: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.s: B = None
        self.o: C = None
        self.t: D = None
        self.z: B = None
        self.x: A = None
        self.y: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.u: H = None
        self.x: E = None
        self.v: D = None
        self.o: B = None
        self.q: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: B = None
        self.r: D = None
        self.s: E = None
        self.txt = txt

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

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

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