class A:
    def __init__(self, txt: str):
        self.r: E = None
        self.z: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.u: D = None
        self.z: I = None
        self.r: F = None
        self.x: E = None
        self.q: H = None
        self.v: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: F = 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.z: B = None
        self.w: C = None
        self.u: H = None
        self.t: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: E = None
        self.v: G = None
        self.r: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: G = None
        self.y: B = None
        self.s: C = None
        self.z: E = None
        self.q: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: H = None
        self.p: A = None
        self.x: E = None
        self.q: I = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.u: D = None
        self.z: I = None
        self.r: F = None
        self.x: E = None
        self.q: H = None
        self.v: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: F = 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.z: B = None
        self.w: C = None
        self.u: H = None
        self.t: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: E = None
        self.v: G = None
        self.r: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: G = None
        self.y: B = None
        self.s: C = None
        self.z: E = None
        self.q: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: H = None
        self.p: A = None
        self.x: E = None
        self.q: I = None
        self.txt = txt

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

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