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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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