class A:
    def __init__(self, txt: str):
        self.p: F = None
        self.t: D = None
        self.u: E = None
        self.r: C = None
        self.x: E = None
        self.v: D = None
        self.s: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.p: A = None
        self.x: D = None
        self.z: I = None
        self.r: I = None
        self.y: A = None
        self.t: A = None
        self.s: D = None
        self.v: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.p: I = None
        self.y: H = None
        self.u: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.y: B = None
        self.o: B = None
        self.u: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.z: H = None
        self.r: H = None
        self.o: H = None
        self.v: B = None
        self.s: E = None
        self.p: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: G = None
        self.t: H = None
        self.o: A = None
        self.u: I = None
        self.q: I = None
        self.z: E = None
        self.p: C = None
        self.r: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.r: C = None
        self.q: A = None
        self.z: A = None
        self.x: H = None
        self.y: B = None
        self.v: G = None
        self.u: H = None
        self.txt = txt

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

i.p = l
i.t = g
i.v = g
i.u = k
i.x = k
i.r = d
i.s = m
h.u = g
h.x = g
h.s = g
h.p = i
h.y = i
h.t = i
h.z = m
h.r = m
h.v = m
d.y = m
d.r = l
d.p = b
g.z = d
g.p = m
g.u = m
g.y = b
k.x = g
k.u = g
k.y = h
k.o = h
l.x = k
l.s = k
l.p = k
l.z = b
l.r = b
l.o = b
l.v = h
a.x = f
a.t = b
a.r = b
a.o = i
a.u = m
a.q = m
a.z = k
a.p = d
b.p = a
b.z = l
m.r = d
m.q = i
m.z = i
m.x = b
m.u = b
m.y = h
m.v = a
f.x = a
f.t = b
f.r = b
f.o = i
f.u = m
f.q = m
f.z = k
f.p = d
assert i.r.p.p.x.p.p.p.p.p.p.txt == "
class A:
    def __init__(self, txt: str):
        self.p: F = None
        self.t: D = None
        self.u: E = None
        self.r: C = None
        self.x: E = None
        self.v: D = None
        self.s: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.p: A = None
        self.x: D = None
        self.z: I = None
        self.r: I = None
        self.y: A = None
        self.t: A = None
        self.s: D = None
        self.v: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.p: I = None
        self.y: H = None
        self.u: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.y: B = None
        self.o: B = None
        self.u: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.z: H = None
        self.r: H = None
        self.o: H = None
        self.v: B = None
        self.s: E = None
        self.p: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: G = None
        self.t: H = None
        self.o: A = None
        self.u: I = None
        self.q: I = None
        self.z: E = None
        self.p: C = None
        self.r: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.r: C = None
        self.q: A = None
        self.z: A = None
        self.x: H = None
        self.y: B = None
        self.v: G = None
        self.u: H = None
        self.txt = txt

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

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