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

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

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.z: G = None
        self.w: B = None
        self.s: D = None
        self.v: C = None
        self.q: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.y: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.q: B = None
        self.o: B = None
        self.r: A = None
        self.w: D = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.z: G = None
        self.w: B = None
        self.s: D = None
        self.v: C = None
        self.q: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.y: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.q: B = None
        self.o: B = None
        self.r: A = None
        self.w: D = None
        self.txt = txt

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

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

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