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

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

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

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.r: E = None
        self.u: G = None
        self.s: A = None
        self.p: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.v: C = None
        self.y: C = None
        self.x: B = None
        self.t: A = None
        self.u: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: I = None
        self.s: B = None
        self.txt = txt

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

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.r: E = None
        self.u: G = None
        self.s: A = None
        self.p: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.v: C = None
        self.y: C = None
        self.x: B = None
        self.t: A = None
        self.u: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: I = None
        self.s: B = None
        self.txt = txt

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

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

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

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

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