class A:
    def __init__(self, txt: str):
        self.p: E = None
        self.y: C = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

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

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

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