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

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

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.p: G = None
        self.q: E = None
        self.x: B = None
        self.w: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: H = None
        self.x: H = None
        self.u: C = None
        self.w: C = None
        self.r: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: G = None
        self.p: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: E = None
        self.z: B = None
        self.u: F = None
        self.s: A = None
        self.o: A = None
        self.t: A = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.p: G = None
        self.q: E = None
        self.x: B = None
        self.w: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: H = None
        self.x: H = None
        self.u: C = None
        self.w: C = None
        self.r: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: G = None
        self.p: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: E = None
        self.z: B = None
        self.u: F = None
        self.s: A = None
        self.o: A = None
        self.t: A = None
        self.txt = txt

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

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

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