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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.x: B = None
        self.w: E = None
        self.t: A = None
        self.p: E = None
        self.txt = txt

l = A("l")
c = B("c")
b = C("b")
j = D("j")
f = E("f")
m = F("m")

l.t = m
l.u = c
l.o = b
l.q = b
l.y = f
c.r = l
c.t = j
c.w = j
c.y = b
b.y = m
b.u = m
b.t = m
b.o = f
b.w = c
b.r = c
j.v = f
j.t = f
f.r = c
m.y = j
m.x = c
m.w = f
m.p = f
m.t = l
assert l.y.r.y.y.t.txt == "
class A:
    def __init__(self, txt: str):
        self.t: F = None
        self.u: B = None
        self.o: C = None
        self.q: C = None
        self.y: E = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.x: B = None
        self.w: E = None
        self.t: A = None
        self.p: E = None
        self.txt = txt

l = A("l")
c = B("c")
b = C("b")
j = D("j")
f = E("f")
m = F("m")

l.t = m
l.u = c
l.o = b
l.q = b
l.y = f
c.r = l
c.t = j
c.w = j
c.y = b
b.y = m
b.u = m
b.t = m
b.o = f
b.w = c
b.r = c
j.v = f
j.t = f
f.r = c
m.y = j
m.x = c
m.w = f
m.p = f
m.t = l
assert l.y.r.y.y.t.txt == "l"