class A:
    def __init__(self, txt: str):
        self.x: B = None
        self.o: B = None
        self.u: B = None
        self.r: A = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: A = None
        self.r: A = None
        self.y: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.s: D = None
        self.u: D = None
        self.v: E = None
        self.x: D = None
        self.txt = txt

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

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

h = A("h")
b = B("b")
i = C("i")
k = D("k")
f = E("f")
j = A("j")
l = D("l")
a = E("a")

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

class B:
    def __init__(self, txt: str):
        self.t: A = None
        self.r: A = None
        self.y: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.s: D = None
        self.u: D = None
        self.v: E = None
        self.x: D = None
        self.txt = txt

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

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

h = A("h")
b = B("b")
i = C("i")
k = D("k")
f = E("f")
j = A("j")
l = D("l")
a = E("a")

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