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

class B:
    def __init__(self, txt: str):
        self.q: I = None
        self.v: D = None
        self.s: C = None
        self.y: E = None
        self.z: G = None
        self.t: G = None
        self.p: I = None
        self.o: D = None
        self.x: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.r: B = None
        self.q: H = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.v: G = None
        self.q: E = None
        self.p: B = None
        self.w: D = None
        self.x: E = None
        self.o: G = None
        self.y: A = None
        self.s: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: I = None
        self.v: D = None
        self.s: C = None
        self.y: E = None
        self.z: G = None
        self.t: G = None
        self.p: I = None
        self.o: D = None
        self.x: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.r: B = None
        self.q: H = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.v: G = None
        self.q: E = None
        self.p: B = None
        self.w: D = None
        self.x: E = None
        self.o: G = None
        self.y: A = None
        self.s: A = None
        self.txt = txt

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

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

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