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

class B:
    def __init__(self, txt: str):
        self.u: G = None
        self.z: G = None
        self.t: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.o: H = None
        self.z: H = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.y: F = None
        self.r: C = None
        self.t: F = None
        self.z: B = None
        self.txt = txt

i = A("i")
a = B("a")
b = C("b")
n = D("n")
c = E("c")
f = F("f")
j = G("j")
e = H("e")
m = D("m")
d = A("d")

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

class B:
    def __init__(self, txt: str):
        self.u: G = None
        self.z: G = None
        self.t: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.o: H = None
        self.z: H = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.y: F = None
        self.r: C = None
        self.t: F = None
        self.z: B = None
        self.txt = txt

i = A("i")
a = B("a")
b = C("b")
n = D("n")
c = E("c")
f = F("f")
j = G("j")
e = H("e")
m = D("m")
d = A("d")

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