class A:
    def __init__(self, txt: str):
        self.y: A = None
        self.v: D = None
        self.x: E = None
        self.p: E = None
        self.t: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.w: E = None
        self.t: A = None
        self.r: C = None
        self.s: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: A = None
        self.q: A = None
        self.o: E = None
        self.p: A = None
        self.txt = txt

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

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

b = A("b")
m = B("m")
l = C("l")
j = D("j")
i = E("i")
k = B("k")
n = A("n")
c = C("c")

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

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.w: E = None
        self.t: A = None
        self.r: C = None
        self.s: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: A = None
        self.q: A = None
        self.o: E = None
        self.p: A = None
        self.txt = txt

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

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

b = A("b")
m = B("m")
l = C("l")
j = D("j")
i = E("i")
k = B("k")
n = A("n")
c = C("c")

b.y = n
b.v = j
b.x = i
b.p = i
b.t = m
m.u = b
m.w = i
m.s = i
m.t = n
m.r = l
l.y = n
l.q = b
l.p = b
l.o = i
j.o = c
j.t = c
i.u = c
k.u = b
k.t = b
k.w = i
k.s = i
k.r = c
n.y = b
n.v = j
n.x = i
n.p = i
n.t = k
c.y = b
c.q = b
c.o = i
c.p = n
assert l.y.v.o.q.v.txt == "j"