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

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

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

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

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

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

e = A("e")
l = B("l")
f = C("f")
a = D("a")
j = E("j")
i = F("i")

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

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

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

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

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

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

e = A("e")
l = B("l")
f = C("f")
a = D("a")
j = E("j")
i = F("i")

e.t = a
e.w = a
e.q = f
e.u = f
e.r = i
l.p = i
l.s = i
f.p = e
f.v = e
f.t = e
f.x = i
f.w = a
a.o = f
j.q = l
j.p = l
j.v = i
j.y = i
j.z = e
i.t = l
i.z = l
i.y = l
assert j.p.p.y.s.t.s.txt == "i"