class A:
    def __init__(self, txt: str):
        self.u: E = None
        self.y: F = None
        self.p: I = None
        self.q: G = None
        self.v: E = None
        self.z: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.v: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: I = None
        self.p: I = None
        self.t: J = None
        self.q: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: H = None
        self.s: J = None
        self.w: E = None
        self.x: E = None
        self.o: F = None
        self.r: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: J = None
        self.s: F = None
        self.o: I = None
        self.t: E = None
        self.u: I = None
        self.r: F = None
        self.x: E = None
        self.w: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: C = None
        self.z: G = None
        self.r: H = None
        self.o: J = None
        self.u: C = None
        self.v: H = None
        self.t: J = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.v: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: I = None
        self.p: I = None
        self.t: J = None
        self.q: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: H = None
        self.s: J = None
        self.w: E = None
        self.x: E = None
        self.o: F = None
        self.r: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: J = None
        self.s: F = None
        self.o: I = None
        self.t: E = None
        self.u: I = None
        self.r: F = None
        self.x: E = None
        self.w: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: C = None
        self.z: G = None
        self.r: H = None
        self.o: J = None
        self.u: C = None
        self.v: H = None
        self.t: J = None
        self.txt = txt

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

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

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