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

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

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

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

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

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

b = A("b")
i = B("i")
g = C("g")
f = D("f")
l = E("l")
a = F("a")
n = D("n")

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

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

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

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

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

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

b = A("b")
i = B("i")
g = C("g")
f = D("f")
l = E("l")
a = F("a")
n = D("n")

b.z = i
b.w = g
b.s = g
b.v = f
i.r = g
i.u = b
i.q = a
i.x = a
i.t = n
g.v = n
g.q = a
g.p = l
f.u = g
f.w = g
l.w = a
l.u = f
l.s = g
a.q = l
a.s = l
a.v = l
a.x = f
a.o = i
a.p = g
n.u = g
n.w = g
assert n.u.q.o.u.z.q.q.txt == "l"