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

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

class C:
    def __init__(self, txt: str):
        self.t: J = None
        self.u: F = None
        self.s: E = None
        self.q: E = None
        self.o: F = None
        self.v: E = None
        self.p: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: A = None
        self.x: B = None
        self.q: C = None
        self.o: B = None
        self.r: B = None
        self.v: E = None
        self.w: I = None
        self.t: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.u: C = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.p: H = None
        self.y: E = None
        self.q: H = None
        self.o: J = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: J = None
        self.u: F = None
        self.s: E = None
        self.q: E = None
        self.o: F = None
        self.v: E = None
        self.p: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: A = None
        self.x: B = None
        self.q: C = None
        self.o: B = None
        self.r: B = None
        self.v: E = None
        self.w: I = None
        self.t: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.u: C = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.p: H = None
        self.y: E = None
        self.q: H = None
        self.o: J = None
        self.txt = txt

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

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

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