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

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

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.s: C = None
        self.x: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.s: E = None
        self.r: E = None
        self.q: A = None
        self.x: B = None
        self.txt = txt

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

d = A("d")
m = B("m")
e = C("e")
n = D("n")
c = E("c")
j = B("j")
a = C("a")
h = E("h")

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

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

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.s: C = None
        self.x: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.s: E = None
        self.r: E = None
        self.q: A = None
        self.x: B = None
        self.txt = txt

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

d = A("d")
m = B("m")
e = C("e")
n = D("n")
c = E("c")
j = B("j")
a = C("a")
h = E("h")

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