class A:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: G = None
        self.q: D = None
        self.o: I = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.x: I = None
        self.y: H = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.r: H = None
        self.x: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: H = None
        self.x: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: G = None
        self.q: D = None
        self.o: I = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.x: I = None
        self.y: H = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.r: H = None
        self.x: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: H = None
        self.x: B = None
        self.txt = txt

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

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