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

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.z: D = None
        self.t: E = None
        self.x: D = None
        self.u: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.s: B = None
        self.r: G = None
        self.o: D = None
        self.u: E = None
        self.w: A = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

k = A("k")
c = B("c")
d = C("d")
n = D("n")
i = E("i")
g = F("g")
j = G("j")

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

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.z: D = None
        self.t: E = None
        self.x: D = None
        self.u: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.s: B = None
        self.r: G = None
        self.o: D = None
        self.u: E = None
        self.w: A = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

k = A("k")
c = B("c")
d = C("d")
n = D("n")
i = E("i")
g = F("g")
j = G("j")

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