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

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.w: F = None
        self.o: C = None
        self.z: I = None
        self.t: E = None
        self.y: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.p: E = None
        self.z: E = None
        self.x: A = None
        self.q: F = None
        self.w: A = None
        self.u: D = None
        self.y: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.x: G = None
        self.u: B = None
        self.z: E = None
        self.y: D = None
        self.v: E = None
        self.s: C = None
        self.o: B = None
        self.q: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.y: H = None
        self.p: D = None
        self.s: G = None
        self.u: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.w: F = None
        self.o: C = None
        self.z: I = None
        self.t: E = None
        self.y: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.p: E = None
        self.z: E = None
        self.x: A = None
        self.q: F = None
        self.w: A = None
        self.u: D = None
        self.y: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.x: G = None
        self.u: B = None
        self.z: E = None
        self.y: D = None
        self.v: E = None
        self.s: C = None
        self.o: B = None
        self.q: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.y: H = None
        self.p: D = None
        self.s: G = None
        self.u: F = None
        self.txt = txt

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

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