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

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.q: G = None
        self.v: D = None
        self.p: I = None
        self.s: A = None
        self.r: I = None
        self.o: I = None
        self.u: D = None
        self.x: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: I = None
        self.z: F = None
        self.r: E = None
        self.y: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: I = None
        self.p: F = None
        self.u: C = None
        self.v: I = None
        self.t: I = None
        self.y: C = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.z: F = None
        self.v: G = None
        self.q: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.q: G = None
        self.v: D = None
        self.p: I = None
        self.s: A = None
        self.r: I = None
        self.o: I = None
        self.u: D = None
        self.x: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: I = None
        self.z: F = None
        self.r: E = None
        self.y: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: I = None
        self.p: F = None
        self.u: C = None
        self.v: I = None
        self.t: I = None
        self.y: C = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.z: F = None
        self.v: G = None
        self.q: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: F = None
        self.txt = txt

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

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