class A:
    def __init__(self, txt: str):
        self.q: E = None
        self.t: G = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.w: A = None
        self.u: D = None
        self.s: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: C = None
        self.v: E = None
        self.z: I = None
        self.t: D = None
        self.txt = txt

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

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

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

c = A("c")
a = B("a")
l = C("l")
j = D("j")
n = E("n")
m = F("m")
i = G("i")
f = H("f")
e = I("e")
d = J("d")

c.q = n
c.t = i
a.s = i
l.y = j
l.w = d
j.p = i
n.t = a
m.o = a
m.w = c
m.u = j
m.s = n
i.x = l
i.v = n
i.z = e
i.t = j
f.u = n
f.o = a
f.y = e
f.t = e
f.w = m
f.x = l
f.q = l
f.p = d
e.s = f
e.u = m
e.t = j
e.y = d
d.q = c
d.s = c
d.w = c
d.r = m
d.t = i
d.x = i
d.o = l
d.v = f
assert m.s.t.s.t.p.x.w.t.txt == "
class A:
    def __init__(self, txt: str):
        self.q: E = None
        self.t: G = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.w: A = None
        self.u: D = None
        self.s: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: C = None
        self.v: E = None
        self.z: I = None
        self.t: D = None
        self.txt = txt

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

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

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

c = A("c")
a = B("a")
l = C("l")
j = D("j")
n = E("n")
m = F("m")
i = G("i")
f = H("f")
e = I("e")
d = J("d")

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