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

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.s: F = None
        self.u: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.q: E = None
        self.s: F = None
        self.r: F = None
        self.w: F = None
        self.o: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.o: F = None
        self.y: C = None
        self.v: A = None
        self.q: B = None
        self.u: E = None
        self.x: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.z: B = None
        self.v: D = None
        self.q: C = None
        self.w: G = None
        self.x: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.u: H = None
        self.t: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: F = None
        self.w: C = None
        self.p: B = None
        self.t: D = None
        self.s: H = None
        self.z: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.s: F = None
        self.u: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.q: E = None
        self.s: F = None
        self.r: F = None
        self.w: F = None
        self.o: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.o: F = None
        self.y: C = None
        self.v: A = None
        self.q: B = None
        self.u: E = None
        self.x: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.z: B = None
        self.v: D = None
        self.q: C = None
        self.w: G = None
        self.x: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.u: H = None
        self.t: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: F = None
        self.w: C = None
        self.p: B = None
        self.t: D = None
        self.s: H = None
        self.z: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

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

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