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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.x: F = None
        self.z: F = None
        self.v: E = None
        self.q: F = None
        self.y: H = None
        self.t: D = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.p: D = None
        self.y: G = None
        self.o: A = None
        self.t: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: B = None
        self.r: B = None
        self.t: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.x: F = None
        self.z: F = None
        self.v: E = None
        self.q: F = None
        self.y: H = None
        self.t: D = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.p: D = None
        self.y: G = None
        self.o: A = None
        self.t: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: B = None
        self.r: B = None
        self.t: A = None
        self.txt = txt

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

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