class A:
    def __init__(self, txt: str):
        self.s: A = None
        self.y: C = None
        self.u: D = None
        self.v: A = None
        self.z: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.z: A = None
        self.t: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: F = None
        self.t: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.o: F = None
        self.q: D = None
        self.v: A = None
        self.txt = txt

e = A("e")
m = B("m")
l = C("l")
i = D("i")
d = E("d")
j = F("j")
h = G("h")
k = F("k")
a = A("a")
b = G("b")

e.s = a
e.v = a
e.y = l
e.z = l
e.u = i
m.z = j
l.t = m
l.u = m
l.p = e
i.p = e
d.p = m
d.z = e
d.t = b
j.s = k
j.t = l
h.y = i
h.q = i
h.o = k
h.v = a
k.s = j
k.t = l
a.s = e
a.v = e
a.y = l
a.z = l
a.u = i
b.y = i
b.q = i
b.o = k
b.v = a
assert j.s.t.p.u.p.u.p.y.t.txt == "
class A:
    def __init__(self, txt: str):
        self.s: A = None
        self.y: C = None
        self.u: D = None
        self.v: A = None
        self.z: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.z: A = None
        self.t: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: F = None
        self.t: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.o: F = None
        self.q: D = None
        self.v: A = None
        self.txt = txt

e = A("e")
m = B("m")
l = C("l")
i = D("i")
d = E("d")
j = F("j")
h = G("h")
k = F("k")
a = A("a")
b = G("b")

e.s = a
e.v = a
e.y = l
e.z = l
e.u = i
m.z = j
l.t = m
l.u = m
l.p = e
i.p = e
d.p = m
d.z = e
d.t = b
j.s = k
j.t = l
h.y = i
h.q = i
h.o = k
h.v = a
k.s = j
k.t = l
a.s = e
a.v = e
a.y = l
a.z = l
a.u = i
b.y = i
b.q = i
b.o = k
b.v = a
assert j.s.t.p.u.p.u.p.y.t.txt == "m"