class A:
    def __init__(self, txt: str):
        self.z: H = None
        self.q: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.z: J = None
        self.o: I = None
        self.x: A = None
        self.r: J = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.t: E = None
        self.o: G = None
        self.x: G = None
        self.p: G = None
        self.y: F = None
        self.r: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: H = None
        self.p: C = None
        self.t: E = None
        self.u: D = None
        self.q: F = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.z: J = None
        self.o: I = None
        self.x: A = None
        self.r: J = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.t: E = None
        self.o: G = None
        self.x: G = None
        self.p: G = None
        self.y: F = None
        self.r: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: H = None
        self.p: C = None
        self.t: E = None
        self.u: D = None
        self.q: F = None
        self.txt = txt

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

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

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