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

class B:
    def __init__(self, txt: str):
        self.v: E = None
        self.o: A = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: C = None
        self.o: H = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: E = None
        self.o: A = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: C = None
        self.o: H = None
        self.txt = txt

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

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

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