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

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

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

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

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

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

l = A("l")
k = B("k")
n = C("n")
g = D("g")
e = E("e")
f = F("f")
d = C("d")

l.t = d
l.p = d
k.o = d
k.p = g
k.u = g
k.s = e
k.r = f
k.q = n
n.t = g
g.y = d
g.u = k
g.z = e
e.w = g
e.y = g
e.u = d
e.p = f
f.s = e
f.w = e
f.y = e
f.u = k
f.r = l
f.v = g
d.t = g
assert l.t.t.y.t.txt == "
class A:
    def __init__(self, txt: str):
        self.t: C = None
        self.p: C = None
        self.txt = txt

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

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

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

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

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

l = A("l")
k = B("k")
n = C("n")
g = D("g")
e = E("e")
f = F("f")
d = C("d")

l.t = d
l.p = d
k.o = d
k.p = g
k.u = g
k.s = e
k.r = f
k.q = n
n.t = g
g.y = d
g.u = k
g.z = e
e.w = g
e.y = g
e.u = d
e.p = f
f.s = e
f.w = e
f.y = e
f.u = k
f.r = l
f.v = g
d.t = g
assert l.t.t.y.t.txt == "g"