class A:
    def __init__(self, txt: str):
        self.u: H = None
        self.s: H = None
        self.r: J = None
        self.z: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.y: I = None
        self.q: G = None
        self.o: G = None
        self.v: H = None
        self.u: B = None
        self.z: F = None
        self.w: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: C = None
        self.o: A = None
        self.y: F = None
        self.z: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: D = None
        self.s: B = None
        self.q: H = None
        self.o: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: B = None
        self.s: H = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.y: I = None
        self.q: G = None
        self.o: G = None
        self.v: H = None
        self.u: B = None
        self.z: F = None
        self.w: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: C = None
        self.o: A = None
        self.y: F = None
        self.z: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: D = None
        self.s: B = None
        self.q: H = None
        self.o: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: B = None
        self.s: H = None
        self.txt = txt

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

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