class A:
    def __init__(self, txt: str):
        self.x: C = None
        self.r: G = None
        self.v: D = None
        self.y: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: E = None
        self.t: C = None
        self.q: E = None
        self.y: H = None
        self.u: D = None
        self.v: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.u: E = None
        self.p: A = None
        self.q: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: H = None
        self.w: G = None
        self.r: H = None
        self.z: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: G = None
        self.v: G = None
        self.t: F = None
        self.p: E = None
        self.txt = txt

g = A("g")
d = B("d")
b = C("b")
f = D("f")
m = E("m")
k = F("k")
j = G("j")
c = H("c")
n = B("n")
l = F("l")

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

class B:
    def __init__(self, txt: str):
        self.o: E = None
        self.t: C = None
        self.q: E = None
        self.y: H = None
        self.u: D = None
        self.v: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.u: E = None
        self.p: A = None
        self.q: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: H = None
        self.w: G = None
        self.r: H = None
        self.z: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: G = None
        self.v: G = None
        self.t: F = None
        self.p: E = None
        self.txt = txt

g = A("g")
d = B("d")
b = C("b")
f = D("f")
m = E("m")
k = F("k")
j = G("j")
c = H("c")
n = B("n")
l = F("l")

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