class A:
    def __init__(self, txt: str):
        self.o: I = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.y: G = None
        self.q: A = None
        self.p: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: I = None
        self.x: H = None
        self.o: E = None
        self.q: F = None
        self.v: B = None
        self.z: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: J = None
        self.o: A = None
        self.x: D = None
        self.t: H = None
        self.s: E = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.y: G = None
        self.q: A = None
        self.p: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: I = None
        self.x: H = None
        self.o: E = None
        self.q: F = None
        self.v: B = None
        self.z: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: J = None
        self.o: A = None
        self.x: D = None
        self.t: H = None
        self.s: E = None
        self.txt = txt

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

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

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