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

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.x: E = None
        self.s: F = None
        self.v: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.q: B = None
        self.p: A = None
        self.t: D = None
        self.o: B = None
        self.x: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.y: H = None
        self.q: E = None
        self.p: B = None
        self.x: H = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.x: E = None
        self.s: F = None
        self.v: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.q: B = None
        self.p: A = None
        self.t: D = None
        self.o: B = None
        self.x: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.y: H = None
        self.q: E = None
        self.p: B = None
        self.x: H = None
        self.txt = txt

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

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

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

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