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

class B:
    def __init__(self, txt: str):
        self.p: G = None
        self.w: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.v: J = None
        self.u: A = None
        self.t: H = None
        self.y: B = None
        self.o: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: B = None
        self.x: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.o: B = None
        self.z: G = None
        self.u: I = None
        self.x: J = None
        self.t: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.x: J = None
        self.o: J = None
        self.y: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: E = None
        self.x: F = None
        self.q: G = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.u: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: G = None
        self.w: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.v: J = None
        self.u: A = None
        self.t: H = None
        self.y: B = None
        self.o: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: B = None
        self.x: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.o: B = None
        self.z: G = None
        self.u: I = None
        self.x: J = None
        self.t: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.x: J = None
        self.o: J = None
        self.y: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: E = None
        self.x: F = None
        self.q: G = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.u: G = None
        self.txt = txt

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

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