class A:
    def __init__(self, txt: str):
        self.y: H = None
        self.x: H = None
        self.v: B = None
        self.p: B = None
        self.w: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.x: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: H = None
        self.o: B = None
        self.v: H = None
        self.q: I = None
        self.w: G = None
        self.t: A = None
        self.p: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.y: I = None
        self.z: B = None
        self.t: D = None
        self.q: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: A = None
        self.y: H = None
        self.r: A = None
        self.p: H = None
        self.s: H = None
        self.u: C = None
        self.v: E = None
        self.z: D = None
        self.t: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: B = None
        self.p: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.x: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: H = None
        self.o: B = None
        self.v: H = None
        self.q: I = None
        self.w: G = None
        self.t: A = None
        self.p: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.y: I = None
        self.z: B = None
        self.t: D = None
        self.q: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: A = None
        self.y: H = None
        self.r: A = None
        self.p: H = None
        self.s: H = None
        self.u: C = None
        self.v: E = None
        self.z: D = None
        self.t: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: B = None
        self.p: F = None
        self.txt = txt

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

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