class A:
    def __init__(self, txt: str):
        self.o: H = None
        self.v: B = None
        self.p: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.v: A = None
        self.q: G = None
        self.s: C = None
        self.x: I = None
        self.w: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: H = None
        self.z: B = None
        self.v: I = None
        self.p: I = None
        self.x: I = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.q: I = None
        self.u: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.v: A = None
        self.q: G = None
        self.s: C = None
        self.x: I = None
        self.w: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: H = None
        self.z: B = None
        self.v: I = None
        self.p: I = None
        self.x: I = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.q: I = None
        self.u: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

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

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