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

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

class C:
    def __init__(self, txt: str):
        self.x: A = None
        self.p: A = None
        self.w: E = None
        self.y: H = None
        self.o: B = None
        self.z: B = None
        self.v: B = None
        self.q: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.y: F = None
        self.q: C = None
        self.o: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: A = None
        self.q: G = None
        self.v: H = None
        self.w: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.w: E = None
        self.r: B = None
        self.t: H = None
        self.y: B = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: A = None
        self.p: A = None
        self.w: E = None
        self.y: H = None
        self.o: B = None
        self.z: B = None
        self.v: B = None
        self.q: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.y: F = None
        self.q: C = None
        self.o: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: A = None
        self.q: G = None
        self.v: H = None
        self.w: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.w: E = None
        self.r: B = None
        self.t: H = None
        self.y: B = None
        self.txt = txt

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

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

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