class A:
    def __init__(self, txt: str):
        self.p: B = None
        self.o: H = None
        self.r: D = None
        self.v: F = None
        self.z: B = None
        self.s: E = None
        self.t: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.v: E = None
        self.t: E = None
        self.s: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.z: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: H = None
        self.w: C = None
        self.t: E = None
        self.z: E = None
        self.s: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.y: H = None
        self.t: A = None
        self.z: E = None
        self.x: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.v: E = None
        self.t: E = None
        self.s: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.z: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: H = None
        self.w: C = None
        self.t: E = None
        self.z: E = None
        self.s: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.y: H = None
        self.t: A = None
        self.z: E = None
        self.x: C = None
        self.txt = txt

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

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

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