class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.u: B = None
        self.w: B = None
        self.r: B = None
        self.o: C = None
        self.q: A = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: H = None
        self.p: A = None
        self.y: E = None
        self.x: E = None
        self.w: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.w: B = None
        self.y: E = None
        self.u: G = None
        self.v: F = None
        self.q: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: H = None
        self.p: A = None
        self.y: E = None
        self.x: E = None
        self.w: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.w: B = None
        self.y: E = None
        self.u: G = None
        self.v: F = None
        self.q: A = None
        self.txt = txt

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

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