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

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.r: G = None
        self.p: B = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.z: B = None
        self.v: A = None
        self.u: H = None
        self.w: B = None
        self.y: H = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.r: G = None
        self.p: B = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.z: B = None
        self.v: A = None
        self.u: H = None
        self.w: B = None
        self.y: H = None
        self.txt = txt

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

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