class A:
    def __init__(self, txt: str):
        self.x: G = None
        self.y: C = None
        self.txt = txt

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: I = None
        self.r: F = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: I = None
        self.r: F = None
        self.txt = txt

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

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

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

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