class A:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: H = None
        self.y: H = None
        self.x: G = None
        self.s: E = None
        self.u: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.z: G = None
        self.p: B = None
        self.w: F = None
        self.o: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: A = None
        self.z: H = None
        self.x: I = None
        self.o: H = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.p: F = None
        self.s: D = None
        self.q: B = None
        self.y: I = None
        self.z: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: B = None
        self.x: B = None
        self.z: C = None
        self.u: C = None
        self.t: A = None
        self.q: A = None
        self.y: F = None
        self.p: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: H = None
        self.y: H = None
        self.x: G = None
        self.s: E = None
        self.u: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.z: G = None
        self.p: B = None
        self.w: F = None
        self.o: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: A = None
        self.z: H = None
        self.x: I = None
        self.o: H = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.p: F = None
        self.s: D = None
        self.q: B = None
        self.y: I = None
        self.z: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: B = None
        self.x: B = None
        self.z: C = None
        self.u: C = None
        self.t: A = None
        self.q: A = None
        self.y: F = None
        self.p: F = None
        self.txt = txt

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

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