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

class B:
    def __init__(self, txt: str):
        self.q: H = None
        self.s: C = None
        self.t: C = None
        self.r: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.z: A = None
        self.p: C = None
        self.x: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: H = None
        self.y: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.u: H = None
        self.v: H = None
        self.r: E = None
        self.x: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.w: I = None
        self.x: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: A = None
        self.u: G = None
        self.y: A = None
        self.o: G = None
        self.q: E = None
        self.v: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: I = None
        self.z: G = None
        self.t: D = None
        self.u: I = None
        self.w: E = None
        self.q: E = None
        self.r: C = None
        self.s: G = None
        self.x: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: H = None
        self.s: C = None
        self.t: C = None
        self.r: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.z: A = None
        self.p: C = None
        self.x: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: H = None
        self.y: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.u: H = None
        self.v: H = None
        self.r: E = None
        self.x: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.w: I = None
        self.x: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: A = None
        self.u: G = None
        self.y: A = None
        self.o: G = None
        self.q: E = None
        self.v: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: I = None
        self.z: G = None
        self.t: D = None
        self.u: I = None
        self.w: E = None
        self.q: E = None
        self.r: C = None
        self.s: G = None
        self.x: D = None
        self.txt = txt

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

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