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

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

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.u: C = None
        self.w: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: I = None
        self.o: F = None
        self.t: H = None
        self.s: D = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.u: C = None
        self.w: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: I = None
        self.o: F = None
        self.t: H = None
        self.s: D = None
        self.txt = txt

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

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

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

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