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

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.y: E = None
        self.v: C = None
        self.p: E = None
        self.o: H = None
        self.u: A = None
        self.r: G = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.w: I = None
        self.r: G = None
        self.o: A = None
        self.y: D = None
        self.p: A = None
        self.s: I = None
        self.t: A = None
        self.z: C = None
        self.v: D = None
        self.txt = txt

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

n = A("n")
g = B("g")
i = C("i")
c = D("c")
l = E("l")
h = F("h")
a = G("a")
j = H("j")
b = I("b")
k = G("k")

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

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.y: E = None
        self.v: C = None
        self.p: E = None
        self.o: H = None
        self.u: A = None
        self.r: G = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.w: I = None
        self.r: G = None
        self.o: A = None
        self.y: D = None
        self.p: A = None
        self.s: I = None
        self.t: A = None
        self.z: C = None
        self.v: D = None
        self.txt = txt

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

n = A("n")
g = B("g")
i = C("i")
c = D("c")
l = E("l")
h = F("h")
a = G("a")
j = H("j")
b = I("b")
k = G("k")

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