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

class B:
    def __init__(self, txt: str):
        self.s: J = None
        self.t: G = None
        self.w: G = None
        self.p: A = None
        self.o: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: J = None
        self.txt = txt

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

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

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.o: G = None
        self.q: D = None
        self.p: I = None
        self.y: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: J = None
        self.t: G = None
        self.w: G = None
        self.p: A = None
        self.o: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: J = None
        self.txt = txt

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

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

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.o: G = None
        self.q: D = None
        self.p: I = None
        self.y: F = None
        self.txt = txt

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

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