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

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

l = A("l")
h = B("h")
n = C("n")
a = D("a")
g = E("g")
d = F("d")

l.t = h
l.s = h
l.u = h
l.o = h
l.p = h
h.w = l
h.o = n
n.r = h
n.o = h
n.z = g
a.q = g
a.u = n
a.z = n
a.p = l
a.y = h
g.y = d
d.x = n
assert l.o.w.u.txt == "
class A:
    def __init__(self, txt: str):
        self.t: B = None
        self.s: B = None
        self.u: B = None
        self.o: B = None
        self.p: B = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

l = A("l")
h = B("h")
n = C("n")
a = D("a")
g = E("g")
d = F("d")

l.t = h
l.s = h
l.u = h
l.o = h
l.p = h
h.w = l
h.o = n
n.r = h
n.o = h
n.z = g
a.q = g
a.u = n
a.z = n
a.p = l
a.y = h
g.y = d
d.x = n
assert l.o.w.u.txt == "h"