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

class B:
    def __init__(self, txt: str):
        self.v: H = None
        self.q: C = None
        self.x: J = None
        self.y: J = None
        self.o: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.o: G = None
        self.r: I = None
        self.q: C = None
        self.p: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.t: H = None
        self.s: F = None
        self.x: D = None
        self.w: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: J = None
        self.p: B = None
        self.r: C = None
        self.w: J = None
        self.q: E = None
        self.v: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: J = None
        self.v: B = None
        self.z: D = None
        self.t: D = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.t: F = None
        self.w: I = None
        self.y: G = None
        self.q: I = None
        self.r: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: H = None
        self.q: C = None
        self.x: J = None
        self.y: J = None
        self.o: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.o: G = None
        self.r: I = None
        self.q: C = None
        self.p: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.t: H = None
        self.s: F = None
        self.x: D = None
        self.w: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: J = None
        self.p: B = None
        self.r: C = None
        self.w: J = None
        self.q: E = None
        self.v: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: J = None
        self.v: B = None
        self.z: D = None
        self.t: D = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.t: F = None
        self.w: I = None
        self.y: G = None
        self.q: I = None
        self.r: A = None
        self.txt = txt

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

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