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

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.v: D = None
        self.q: D = None
        self.w: F = None
        self.y: A = None
        self.o: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.v: D = None
        self.q: D = None
        self.w: F = None
        self.y: A = None
        self.o: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

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

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