class A:
    def __init__(self, txt: str):
        self.o: E = None
        self.u: C = None
        self.r: C = None
        self.v: E = None
        self.q: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

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

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

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

h = A("h")
f = B("f")
i = C("i")
m = D("m")
k = E("k")
j = B("j")
l = D("l")
c = C("c")

h.o = k
h.v = k
h.u = c
h.r = c
h.q = c
f.v = m
i.x = k
i.r = k
i.t = m
i.u = c
m.x = h
m.t = k
m.z = f
m.u = i
m.o = l
k.v = f
k.o = c
j.v = l
l.x = h
l.t = k
l.z = f
l.u = c
l.o = m
c.x = k
c.r = k
c.t = l
c.u = i
assert c.u.u.r.o.x.v.txt == "
class A:
    def __init__(self, txt: str):
        self.o: E = None
        self.u: C = None
        self.r: C = None
        self.v: E = None
        self.q: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

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

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

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

h = A("h")
f = B("f")
i = C("i")
m = D("m")
k = E("k")
j = B("j")
l = D("l")
c = C("c")

h.o = k
h.v = k
h.u = c
h.r = c
h.q = c
f.v = m
i.x = k
i.r = k
i.t = m
i.u = c
m.x = h
m.t = k
m.z = f
m.u = i
m.o = l
k.v = f
k.o = c
j.v = l
l.x = h
l.t = k
l.z = f
l.u = c
l.o = m
c.x = k
c.r = k
c.t = l
c.u = i
assert c.u.u.r.o.x.v.txt == "f"