class A:
    def __init__(self, txt: str):
        self.w: B = None
        self.x: C = None
        self.t: D = None
        self.p: C = None
        self.txt = txt

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

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

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

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

e = A("e")
j = B("j")
f = C("f")
i = D("i")
b = E("b")
m = D("m")
n = C("n")
l = E("l")
g = C("g")

e.w = j
e.x = g
e.p = g
e.t = m
j.s = b
j.t = b
f.t = j
f.o = m
f.v = n
f.p = l
i.v = e
i.x = b
i.r = j
b.s = g
b.u = g
b.r = f
m.v = e
m.x = b
m.r = j
n.t = j
n.o = m
n.v = f
n.p = b
l.s = f
l.r = f
l.u = n
g.t = j
g.o = i
g.v = n
g.p = b
assert j.t.r.p.r.v.v.t.txt == "
class A:
    def __init__(self, txt: str):
        self.w: B = None
        self.x: C = None
        self.t: D = None
        self.p: C = None
        self.txt = txt

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

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

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

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

e = A("e")
j = B("j")
f = C("f")
i = D("i")
b = E("b")
m = D("m")
n = C("n")
l = E("l")
g = C("g")

e.w = j
e.x = g
e.p = g
e.t = m
j.s = b
j.t = b
f.t = j
f.o = m
f.v = n
f.p = l
i.v = e
i.x = b
i.r = j
b.s = g
b.u = g
b.r = f
m.v = e
m.x = b
m.r = j
n.t = j
n.o = m
n.v = f
n.p = b
l.s = f
l.r = f
l.u = n
g.t = j
g.o = i
g.v = n
g.p = b
assert j.t.r.p.r.v.v.t.txt == "j"