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

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

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

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.z: H = None
        self.r: C = None
        self.o: C = None
        self.s: G = None
        self.w: H = None
        self.x: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: I = None
        self.o: G = None
        self.r: H = None
        self.v: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.z: H = None
        self.r: C = None
        self.o: C = None
        self.s: G = None
        self.w: H = None
        self.x: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: I = None
        self.o: G = None
        self.r: H = None
        self.v: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

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

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

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