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

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

class C:
    def __init__(self, txt: str):
        self.v: E = None
        self.s: F = None
        self.q: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.r: C = None
        self.y: B = None
        self.p: E = None
        self.v: E = None
        self.txt = txt

b = A("b")
e = B("e")
n = C("n")
g = D("g")
i = E("i")
k = F("k")
a = F("a")

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

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

class C:
    def __init__(self, txt: str):
        self.v: E = None
        self.s: F = None
        self.q: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.r: C = None
        self.y: B = None
        self.p: E = None
        self.v: E = None
        self.txt = txt

b = A("b")
e = B("e")
n = C("n")
g = D("g")
i = E("i")
k = F("k")
a = F("a")

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