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

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

class C:
    def __init__(self, txt: str):
        self.y: A = None
        self.s: F = None
        self.w: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.x: H = None
        self.z: J = None
        self.q: I = None
        self.t: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: D = None
        self.w: A = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: A = None
        self.s: F = None
        self.w: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.x: H = None
        self.z: J = None
        self.q: I = None
        self.t: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: D = None
        self.w: A = None
        self.txt = txt

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

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

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

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

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