class A:
    def __init__(self, txt: str):
        self.p: E = None
        self.y: A = None
        self.t: C = None
        self.r: E = None
        self.o: A = 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.u: A = None
        self.o: B = None
        self.s: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: D = None
        self.y: B = None
        self.z: B = None
        self.t: E = None
        self.txt = txt

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

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

n.p = a
n.r = a
n.y = i
n.t = g
n.o = b
m.v = f
g.u = n
g.o = m
g.s = m
f.w = e
f.y = m
f.z = m
f.t = a
a.r = g
a.z = m
d.w = e
d.y = m
d.z = m
d.t = a
i.p = a
i.r = a
i.y = n
i.t = g
i.o = b
b.p = a
b.r = a
b.y = i
b.o = i
b.t = g
e.w = d
e.y = m
e.z = m
e.t = a
assert b.t.s.v.t.r.txt == "
class A:
    def __init__(self, txt: str):
        self.p: E = None
        self.y: A = None
        self.t: C = None
        self.r: E = None
        self.o: A = 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.u: A = None
        self.o: B = None
        self.s: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: D = None
        self.y: B = None
        self.z: B = None
        self.t: E = None
        self.txt = txt

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

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

n.p = a
n.r = a
n.y = i
n.t = g
n.o = b
m.v = f
g.u = n
g.o = m
g.s = m
f.w = e
f.y = m
f.z = m
f.t = a
a.r = g
a.z = m
d.w = e
d.y = m
d.z = m
d.t = a
i.p = a
i.r = a
i.y = n
i.t = g
i.o = b
b.p = a
b.r = a
b.y = i
b.o = i
b.t = g
e.w = d
e.y = m
e.z = m
e.t = a
assert b.t.s.v.t.r.txt == "g"