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

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.z: F = None
        self.txt = txt

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

h = A("h")
d = B("d")
l = C("l")
j = D("j")
e = E("e")
c = F("c")
a = F("a")

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.z: F = None
        self.txt = txt

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

h = A("h")
d = B("d")
l = C("l")
j = D("j")
e = E("e")
c = F("c")
a = F("a")

h.o = l
h.p = l
h.u = l
h.t = l
d.t = l
d.z = h
d.u = h
d.x = h
d.v = j
l.x = j
l.r = j
l.p = h
l.y = h
l.q = h
l.t = h
j.y = d
j.r = a
j.u = e
e.r = h
e.z = a
c.w = d
c.u = j
c.p = j
a.w = d
a.u = j
a.p = j
assert e.r.u.q.o.y.u.txt == "l"