class A:
    def __init__(self, txt: str):
        self.p: F = None
        self.z: E = None
        self.v: C = None
        self.w: H = None
        self.q: F = None
        self.y: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.r: D = None
        self.x: B = None
        self.u: G = None
        self.p: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: H = None
        self.y: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: H = None
        self.r: C = None
        self.y: H = None
        self.o: D = None
        self.u: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: F = None
        self.o: C = None
        self.q: B = None
        self.y: E = None
        self.w: D = None
        self.p: C = None
        self.v: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.r: D = None
        self.x: B = None
        self.u: G = None
        self.p: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: H = None
        self.y: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: H = None
        self.r: C = None
        self.y: H = None
        self.o: D = None
        self.u: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: F = None
        self.o: C = None
        self.q: B = None
        self.y: E = None
        self.w: D = None
        self.p: C = None
        self.v: D = None
        self.txt = txt

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

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