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

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.r: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: E = None
        self.z: A = None
        self.t: E = None
        self.u: C = None
        self.x: C = None
        self.q: A = None
        self.o: A = None
        self.v: D = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.r: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: E = None
        self.z: A = None
        self.t: E = None
        self.u: C = None
        self.x: C = None
        self.q: A = None
        self.o: A = None
        self.v: D = None
        self.txt = txt

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

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

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