class A:
    def __init__(self, txt: str):
        self.z: F = None
        self.t: B = None
        self.s: D = None
        self.r: C = None
        self.p: C = None
        self.q: B = None
        self.v: I = None
        self.w: C = None
        self.y: I = None
        self.x: I = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: J = None
        self.z: F = None
        self.y: E = None
        self.r: G = None
        self.o: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.o: J = None
        self.v: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: I = None
        self.r: C = None
        self.o: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: C = None
        self.p: J = None
        self.y: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: D = None
        self.r: E = None
        self.w: C = None
        self.p: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: B = None
        self.y: C = None
        self.q: F = None
        self.r: D = None
        self.t: H = None
        self.z: H = None
        self.x: D = None
        self.w: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: J = None
        self.z: F = None
        self.y: E = None
        self.r: G = None
        self.o: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.o: J = None
        self.v: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: I = None
        self.r: C = None
        self.o: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: C = None
        self.p: J = None
        self.y: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: D = None
        self.r: E = None
        self.w: C = None
        self.p: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: B = None
        self.y: C = None
        self.q: F = None
        self.r: D = None
        self.t: H = None
        self.z: H = None
        self.x: D = None
        self.w: F = None
        self.txt = txt

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

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