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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: J = None
        self.r: H = None
        self.v: J = None
        self.y: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: D = None
        self.r: I = None
        self.z: C = None
        self.w: A = None
        self.v: E = None
        self.t: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: B = None
        self.q: F = None
        self.v: F = None
        self.s: C = None
        self.u: G = None
        self.x: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: E = None
        self.y: B = None
        self.x: D = None
        self.p: D = None
        self.w: D = None
        self.t: E = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: J = None
        self.r: H = None
        self.v: J = None
        self.y: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: D = None
        self.r: I = None
        self.z: C = None
        self.w: A = None
        self.v: E = None
        self.t: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: B = None
        self.q: F = None
        self.v: F = None
        self.s: C = None
        self.u: G = None
        self.x: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: E = None
        self.y: B = None
        self.x: D = None
        self.p: D = None
        self.w: D = None
        self.t: E = None
        self.txt = txt

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

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