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

class B:
    def __init__(self, txt: str):
        self.p: B = None
        self.z: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.v: E = None
        self.w: B = None
        self.t: A = None
        self.u: B = None
        self.txt = txt

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

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

f = A("f")
h = B("h")
k = C("k")
b = D("b")
c = E("c")
j = A("j")
d = E("d")
l = B("l")

f.p = h
f.t = j
f.w = j
h.p = l
h.z = k
k.z = j
k.v = c
k.w = l
k.u = l
k.t = f
b.v = k
b.y = k
c.o = d
c.x = k
c.s = b
j.p = h
j.t = f
j.w = f
d.o = c
d.x = k
d.s = b
l.p = h
l.z = k
assert f.p.z.t.t.txt == "
class A:
    def __init__(self, txt: str):
        self.p: B = None
        self.t: A = None
        self.w: A = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: B = None
        self.z: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.v: E = None
        self.w: B = None
        self.t: A = None
        self.u: B = None
        self.txt = txt

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

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

f = A("f")
h = B("h")
k = C("k")
b = D("b")
c = E("c")
j = A("j")
d = E("d")
l = B("l")

f.p = h
f.t = j
f.w = j
h.p = l
h.z = k
k.z = j
k.v = c
k.w = l
k.u = l
k.t = f
b.v = k
b.y = k
c.o = d
c.x = k
c.s = b
j.p = h
j.t = f
j.w = f
d.o = c
d.x = k
d.s = b
l.p = h
l.z = k
assert f.p.z.t.t.txt == "j"