class A:
    def __init__(self, txt: str):
        self.r: H = None
        self.q: I = None
        self.x: C = None
        self.s: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: G = None
        self.v: A = None
        self.s: D = None
        self.p: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: E = None
        self.y: A = None
        self.u: I = None
        self.r: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: G = None
        self.q: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: I = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.u: H = None
        self.p: G = None
        self.v: B = None
        self.t: G = None
        self.o: C = None
        self.r: F = None
        self.txt = txt

n = A("n")
h = B("h")
l = C("l")
k = D("k")
c = E("c")
i = F("i")
j = G("j")
g = H("g")
d = I("d")

n.r = g
n.q = d
n.x = l
n.s = c
h.q = j
h.v = n
h.s = k
h.p = c
l.v = c
l.y = n
l.u = d
l.r = h
k.y = n
k.u = j
k.q = j
k.s = j
k.t = d
k.r = d
k.w = l
k.z = l
k.p = h
c.u = j
c.q = h
i.p = d
j.v = d
g.v = l
g.u = l
g.t = l
g.q = j
g.x = j
g.y = c
g.w = i
g.p = i
g.s = d
d.u = g
d.p = j
d.t = j
d.v = h
d.o = l
d.r = i
assert n.q.u.s.r.p.u.y.q.txt == "
class A:
    def __init__(self, txt: str):
        self.r: H = None
        self.q: I = None
        self.x: C = None
        self.s: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: G = None
        self.v: A = None
        self.s: D = None
        self.p: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: E = None
        self.y: A = None
        self.u: I = None
        self.r: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: G = None
        self.q: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: I = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.u: H = None
        self.p: G = None
        self.v: B = None
        self.t: G = None
        self.o: C = None
        self.r: F = None
        self.txt = txt

n = A("n")
h = B("h")
l = C("l")
k = D("k")
c = E("c")
i = F("i")
j = G("j")
g = H("g")
d = I("d")

n.r = g
n.q = d
n.x = l
n.s = c
h.q = j
h.v = n
h.s = k
h.p = c
l.v = c
l.y = n
l.u = d
l.r = h
k.y = n
k.u = j
k.q = j
k.s = j
k.t = d
k.r = d
k.w = l
k.z = l
k.p = h
c.u = j
c.q = h
i.p = d
j.v = d
g.v = l
g.u = l
g.t = l
g.q = j
g.x = j
g.y = c
g.w = i
g.p = i
g.s = d
d.u = g
d.p = j
d.t = j
d.v = h
d.o = l
d.r = i
assert n.q.u.s.r.p.u.y.q.txt == "h"