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

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

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

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.y: G = None
        self.t: I = None
        self.q: C = None
        self.r: H = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.t: E = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.y: G = None
        self.t: I = None
        self.q: C = None
        self.r: H = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.t: E = None
        self.txt = txt

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

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

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