class A:
    def __init__(self, txt: str):
        self.q: D = None
        self.y: I = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.z: E = None
        self.s: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.z: G = None
        self.s: H = None
        self.r: G = None
        self.o: I = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.x: H = None
        self.q: H = None
        self.t: B = None
        self.v: H = None
        self.s: D = None
        self.r: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: C = None
        self.p: I = None
        self.s: H = None
        self.o: F = None
        self.x: C = None
        self.y: F = None
        self.v: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.z: E = None
        self.s: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.z: G = None
        self.s: H = None
        self.r: G = None
        self.o: I = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.x: H = None
        self.q: H = None
        self.t: B = None
        self.v: H = None
        self.s: D = None
        self.r: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: C = None
        self.p: I = None
        self.s: H = None
        self.o: F = None
        self.x: C = None
        self.y: F = None
        self.v: D = None
        self.txt = txt

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

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