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

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.r: D = None
        self.y: A = None
        self.q: E = None
        self.x: F = None
        self.v: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: F = None
        self.r: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: A = None
        self.p: A = None
        self.s: F = None
        self.w: C = None
        self.z: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.p: E = None
        self.v: D = None
        self.t: G = None
        self.txt = txt

g = A("g")
h = B("h")
j = C("j")
c = D("c")
f = E("f")
e = F("e")
n = G("n")
k = E("k")
i = G("i")
a = G("a")

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

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.r: D = None
        self.y: A = None
        self.q: E = None
        self.x: F = None
        self.v: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: F = None
        self.r: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: A = None
        self.p: A = None
        self.s: F = None
        self.w: C = None
        self.z: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.p: E = None
        self.v: D = None
        self.t: G = None
        self.txt = txt

g = A("g")
h = B("h")
j = C("j")
c = D("c")
f = E("f")
e = F("e")
n = G("n")
k = E("k")
i = G("i")
a = G("a")

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