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

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

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

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.o: F = None
        self.t: B = None
        self.y: A = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.o: E = None
        self.r: F = None
        self.q: C = None
        self.txt = txt

k = A("k")
a = B("a")
n = C("n")
c = D("c")
m = E("m")
l = F("l")
f = G("f")
g = H("g")
j = H("j")

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

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

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

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.o: F = None
        self.t: B = None
        self.y: A = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.o: E = None
        self.r: F = None
        self.q: C = None
        self.txt = txt

k = A("k")
a = B("a")
n = C("n")
c = D("c")
m = E("m")
l = F("l")
f = G("f")
g = H("g")
j = H("j")

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