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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.x: E = None
        self.t: C = None
        self.u: G = None
        self.z: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.r: D = None
        self.y: A = None
        self.u: A = None
        self.txt = txt

i = A("i")
m = B("m")
l = C("l")
k = D("k")
e = E("e")
n = F("n")
c = G("c")
f = D("f")
j = F("j")
a = F("a")

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.x: E = None
        self.t: C = None
        self.u: G = None
        self.z: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.r: D = None
        self.y: A = None
        self.u: A = None
        self.txt = txt

i = A("i")
m = B("m")
l = C("l")
k = D("k")
e = E("e")
n = F("n")
c = G("c")
f = D("f")
j = F("j")
a = F("a")

i.y = m
m.s = e
m.z = i
l.p = c
l.u = c
l.w = m
k.r = i
k.x = i
e.q = i
n.v = l
n.t = l
n.z = l
n.x = e
n.u = c
c.s = m
c.r = k
c.y = i
c.u = i
f.r = i
f.x = i
j.v = l
j.t = l
j.z = l
j.x = e
j.u = c
a.v = l
a.t = l
a.z = l
a.x = e
a.u = c
assert e.q.y.s.q.y.s.q.y.txt == "m"