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

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.x: I = None
        self.q: C = None
        self.o: F = None
        self.t: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: H = None
        self.w: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.u: F = None
        self.y: A = None
        self.q: H = None
        self.z: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: F = None
        self.v: A = None
        self.q: D = None
        self.s: C = None
        self.x: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.v: H = None
        self.t: J = None
        self.q: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: G = None
        self.v: C = None
        self.u: F = None
        self.x: D = None
        self.s: H = None
        self.w: A = None
        self.q: F = None
        self.z: D = None
        self.t: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.x: I = None
        self.q: C = None
        self.o: F = None
        self.t: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: H = None
        self.w: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.u: F = None
        self.y: A = None
        self.q: H = None
        self.z: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: F = None
        self.v: A = None
        self.q: D = None
        self.s: C = None
        self.x: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.v: H = None
        self.t: J = None
        self.q: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: G = None
        self.v: C = None
        self.u: F = None
        self.x: D = None
        self.s: H = None
        self.w: A = None
        self.q: F = None
        self.z: D = None
        self.t: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

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

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