class A:
    def __init__(self, txt: str):
        self.r: B = None
        self.u: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: E = None
        self.v: E = None
        self.x: H = None
        self.q: F = None
        self.t: H = None
        self.w: A = None
        self.o: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: H = None
        self.s: A = None
        self.y: D = None
        self.q: B = None
        self.txt = txt

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: E = None
        self.v: E = None
        self.x: H = None
        self.q: F = None
        self.t: H = None
        self.w: A = None
        self.o: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: H = None
        self.s: A = None
        self.y: D = None
        self.q: B = None
        self.txt = txt

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

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

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

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

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

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