class A:
    def __init__(self, txt: str):
        self.w: D = None
        self.v: F = None
        self.z: C = None
        self.s: B = None
        self.o: E = None
        self.r: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: A = None
        self.r: A = None
        self.q: A = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: A = None
        self.r: A = None
        self.q: A = None
        self.txt = txt

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

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

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

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

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

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