class A:
    def __init__(self, txt: str):
        self.p: F = None
        self.x: F = None
        self.q: E = None
        self.r: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: F = None
        self.t: E = None
        self.x: A = None
        self.p: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: H = None
        self.x: D = None
        self.w: D = None
        self.t: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: G = None
        self.q: G = None
        self.r: C = None
        self.y: I = None
        self.s: C = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: F = None
        self.t: E = None
        self.x: A = None
        self.p: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: H = None
        self.x: D = None
        self.w: D = None
        self.t: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: G = None
        self.q: G = None
        self.r: C = None
        self.y: I = None
        self.s: C = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

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

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