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

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.w: E = None
        self.txt = txt

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

j.t = m
j.v = m
j.p = b
j.q = k
j.y = a
d.z = m
d.o = a
d.r = f
d.w = j
a.q = d
a.u = m
a.y = k
e.v = g
e.o = f
e.t = f
e.s = a
e.z = d
k.x = e
k.w = f
g.v = b
g.o = k
g.t = f
g.s = a
g.z = d
b.v = g
b.o = k
b.t = k
b.s = a
b.z = d
f.x = e
f.w = k
m.t = j
m.v = j
m.p = g
m.q = f
m.y = a
assert d.z.q.w.w.w.x.t.w.w.txt == "
class A:
    def __init__(self, txt: str):
        self.t: A = None
        self.v: A = None
        self.p: D = None
        self.q: E = None
        self.y: C = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.w: E = None
        self.txt = txt

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

j.t = m
j.v = m
j.p = b
j.q = k
j.y = a
d.z = m
d.o = a
d.r = f
d.w = j
a.q = d
a.u = m
a.y = k
e.v = g
e.o = f
e.t = f
e.s = a
e.z = d
k.x = e
k.w = f
g.v = b
g.o = k
g.t = f
g.s = a
g.z = d
b.v = g
b.o = k
b.t = k
b.s = a
b.z = d
f.x = e
f.w = k
m.t = j
m.v = j
m.p = g
m.q = f
m.y = a
assert d.z.q.w.w.w.x.t.w.w.txt == "f"