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

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

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

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

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

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

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

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

i = A("i")
h = B("h")
n = C("n")
b = D("b")
f = E("f")
j = F("j")
e = G("e")
k = H("k")
l = F("l")

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

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

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

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

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

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

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

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

i = A("i")
h = B("h")
n = C("n")
b = D("b")
f = E("f")
j = F("j")
e = G("e")
k = H("k")
l = F("l")

i.o = f
i.q = n
i.x = n
i.r = k
i.s = k
i.t = h
i.p = h
i.w = j
h.w = n
h.s = b
h.o = k
h.p = j
h.x = j
h.r = i
n.w = k
b.q = n
b.x = n
b.v = k
b.s = e
b.z = f
b.t = f
b.o = f
b.w = j
f.o = i
f.s = i
f.z = b
f.q = e
f.v = k
j.z = n
j.o = n
j.x = e
j.p = f
e.p = i
e.z = b
e.y = b
e.o = j
e.s = n
k.w = b
k.s = i
l.z = n
l.o = n
l.x = e
l.p = f
assert k.w.v.w.s.p.txt == "i"