class A:
    def __init__(self, txt: str):
        self.p: C = None
        self.o: D = None
        self.z: E = None
        self.x: B = None
        self.v: C = None
        self.txt = txt

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

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

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

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

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

f = A("f")
l = B("l")
c = C("c")
g = D("g")
b = E("b")
h = F("h")
n = F("n")

f.p = c
f.v = c
f.o = g
f.z = b
f.x = l
l.t = b
l.s = b
l.w = h
l.q = h
c.o = g
c.v = f
g.t = f
g.v = b
b.t = f
b.p = h
b.x = c
b.z = c
b.q = l
b.y = g
h.s = f
h.u = l
h.t = n
n.s = f
n.u = l
n.t = h
assert h.u.w.t.t.u.txt == "
class A:
    def __init__(self, txt: str):
        self.p: C = None
        self.o: D = None
        self.z: E = None
        self.x: B = None
        self.v: C = None
        self.txt = txt

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

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

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

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

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

f = A("f")
l = B("l")
c = C("c")
g = D("g")
b = E("b")
h = F("h")
n = F("n")

f.p = c
f.v = c
f.o = g
f.z = b
f.x = l
l.t = b
l.s = b
l.w = h
l.q = h
c.o = g
c.v = f
g.t = f
g.v = b
b.t = f
b.p = h
b.x = c
b.z = c
b.q = l
b.y = g
h.s = f
h.u = l
h.t = n
n.s = f
n.u = l
n.t = h
assert h.u.w.t.t.u.txt == "l"