class A:
    def __init__(self, txt: str):
        self.p: A = None
        self.w: F = None
        self.o: E = None
        self.z: D = None
        self.s: D = None
        self.t: D = None
        self.r: A = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.t: D = None
        self.v: B = None
        self.u: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: H = None
        self.t: C = None
        self.p: C = None
        self.u: C = None
        self.x: G = None
        self.z: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.t: H = None
        self.q: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: F = None
        self.x: A = None
        self.t: G = None
        self.s: D = None
        self.y: F = None
        self.p: C = None
        self.z: C = None
        self.o: G = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.t: D = None
        self.v: B = None
        self.u: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: H = None
        self.t: C = None
        self.p: C = None
        self.u: C = None
        self.x: G = None
        self.z: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.t: H = None
        self.q: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: F = None
        self.x: A = None
        self.t: G = None
        self.s: D = None
        self.y: F = None
        self.p: C = None
        self.z: C = None
        self.o: G = None
        self.txt = txt

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

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