class A:
    def __init__(self, txt: str):
        self.u: E = None
        self.q: E = None
        self.y: E = None
        self.o: D = None
        self.x: D = None
        self.txt = txt

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

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

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

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

j = A("j")
b = B("b")
n = C("n")
f = D("f")
h = E("h")
a = D("a")
c = D("c")
l = C("l")

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

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

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

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

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

j = A("j")
b = B("b")
n = C("n")
f = D("f")
h = E("h")
a = D("a")
c = D("c")
l = C("l")

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