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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.s: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.w: G = None
        self.p: B = None
        self.x: E = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.p: F = None
        self.y: F = None
        self.txt = txt

d = A("d")
h = B("h")
f = C("f")
c = D("c")
j = E("j")
i = F("i")
b = G("b")
k = H("k")
a = F("a")

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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.s: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.w: G = None
        self.p: B = None
        self.x: E = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.p: F = None
        self.y: F = None
        self.txt = txt

d = A("d")
h = B("h")
f = C("f")
c = D("c")
j = E("j")
i = F("i")
b = G("b")
k = H("k")
a = F("a")

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