class A:
    def __init__(self, txt: str):
        self.q: F = None
        self.u: D = None
        self.w: E = None
        self.y: C = None
        self.x: C = None
        self.r: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: G = None
        self.t: G = None
        self.o: G = None
        self.q: F = None
        self.s: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: G = None
        self.s: B = None
        self.z: A = None
        self.t: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.y: C = None
        self.s: D = None
        self.t: B = None
        self.p: D = None
        self.x: C = None
        self.o: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.o: F = None
        self.t: E = None
        self.y: D = None
        self.q: E = None
        self.u: F = None
        self.p: A = None
        self.w: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: F = None
        self.r: A = None
        self.w: F = None
        self.p: G = None
        self.t: C = None
        self.txt = txt

d = A("d")
h = B("h")
a = C("a")
l = D("l")
c = E("c")
n = F("n")
j = G("j")
m = H("m")

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

class B:
    def __init__(self, txt: str):
        self.p: G = None
        self.t: G = None
        self.o: G = None
        self.q: F = None
        self.s: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: G = None
        self.s: B = None
        self.z: A = None
        self.t: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.y: C = None
        self.s: D = None
        self.t: B = None
        self.p: D = None
        self.x: C = None
        self.o: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.o: F = None
        self.t: E = None
        self.y: D = None
        self.q: E = None
        self.u: F = None
        self.p: A = None
        self.w: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: F = None
        self.r: A = None
        self.w: F = None
        self.p: G = None
        self.t: C = None
        self.txt = txt

d = A("d")
h = B("h")
a = C("a")
l = D("l")
c = E("c")
n = F("n")
j = G("j")
m = H("m")

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