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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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