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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.o: D = None
        self.s: B = None
        self.w: A = None
        self.x: F = None
        self.txt = txt

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

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.o: D = None
        self.s: B = None
        self.w: A = None
        self.x: F = None
        self.txt = txt

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

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

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