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

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

class C:
    def __init__(self, txt: str):
        self.q: H = None
        self.w: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.z: A = None
        self.o: J = None
        self.s: I = None
        self.p: G = None
        self.v: J = None
        self.y: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.u: J = None
        self.s: I = None
        self.q: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: I = None
        self.w: G = None
        self.t: D = None
        self.p: I = None
        self.v: J = None
        self.u: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: F = None
        self.t: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: H = None
        self.w: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.z: A = None
        self.o: J = None
        self.s: I = None
        self.p: G = None
        self.v: J = None
        self.y: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.u: J = None
        self.s: I = None
        self.q: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: I = None
        self.w: G = None
        self.t: D = None
        self.p: I = None
        self.v: J = None
        self.u: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: F = None
        self.t: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

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

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