class A:
    def __init__(self, txt: str):
        self.u: E = None
        self.q: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: E = None
        self.u: B = None
        self.txt = txt

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

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

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

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

e = A("e")
c = B("c")
d = C("d")
b = D("b")
l = E("l")
h = F("h")
f = B("f")

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

class B:
    def __init__(self, txt: str):
        self.p: E = None
        self.u: B = None
        self.txt = txt

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

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

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

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

e = A("e")
c = B("c")
d = C("d")
b = D("b")
l = E("l")
h = F("h")
f = B("f")

e.u = l
e.q = c
c.p = l
c.u = f
d.w = b
d.o = b
d.t = b
d.u = b
d.x = l
b.v = l
b.t = l
b.u = h
l.y = b
h.u = f
h.p = l
h.q = l
f.p = l
f.u = c
assert c.u.p.y.t.y.txt == "b"