class A:
    def __init__(self, txt: str):
        self.s: I = None
        self.v: H = None
        self.w: E = None
        self.t: I = None
        self.p: D = None
        self.z: G = None
        self.o: D = None
        self.u: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.r: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.v: A = None
        self.z: E = None
        self.w: F = None
        self.t: A = None
        self.q: J = None
        self.o: J = None
        self.y: C = None
        self.s: C = None
        self.x: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: I = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.r: C = None
        self.txt = txt

i = A("i")
n = B("n")
c = C("c")
k = D("k")
e = E("e")
h = F("h")
a = G("a")
l = H("l")
m = I("m")
g = J("g")

i.s = m
i.t = m
i.v = l
i.w = e
i.p = k
i.o = k
i.u = k
i.z = a
n.z = h
n.x = h
c.y = h
c.r = a
k.x = m
k.z = m
e.v = c
h.q = n
a.u = k
a.v = i
a.t = i
a.z = e
a.w = h
a.q = g
a.o = g
a.y = c
a.s = c
a.x = n
l.p = m
m.o = c
m.s = e
m.t = a
m.x = l
m.p = h
m.z = h
m.w = n
m.y = n
g.r = c
assert e.v.r.x.x.q.x.q.z.q.txt == "
class A:
    def __init__(self, txt: str):
        self.s: I = None
        self.v: H = None
        self.w: E = None
        self.t: I = None
        self.p: D = None
        self.z: G = None
        self.o: D = None
        self.u: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.r: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.v: A = None
        self.z: E = None
        self.w: F = None
        self.t: A = None
        self.q: J = None
        self.o: J = None
        self.y: C = None
        self.s: C = None
        self.x: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: I = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.r: C = None
        self.txt = txt

i = A("i")
n = B("n")
c = C("c")
k = D("k")
e = E("e")
h = F("h")
a = G("a")
l = H("l")
m = I("m")
g = J("g")

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