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

class B:
    def __init__(self, txt: str):
        self.x: D = None
        self.z: H = None
        self.v: D = None
        self.y: F = None
        self.o: F = None
        self.u: A = None
        self.q: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.y: A = None
        self.v: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: H = None
        self.p: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: F = None
        self.o: F = None
        self.t: B = None
        self.r: B = None
        self.z: A = None
        self.p: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: D = None
        self.t: D = None
        self.txt = txt

g = A("g")
i = B("i")
e = C("e")
f = D("f")
a = E("a")
b = F("b")
k = G("k")
h = H("h")
d = A("d")
c = E("c")

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

class B:
    def __init__(self, txt: str):
        self.x: D = None
        self.z: H = None
        self.v: D = None
        self.y: F = None
        self.o: F = None
        self.u: A = None
        self.q: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.y: A = None
        self.v: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: H = None
        self.p: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: F = None
        self.o: F = None
        self.t: B = None
        self.r: B = None
        self.z: A = None
        self.p: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: D = None
        self.t: D = None
        self.txt = txt

g = A("g")
i = B("i")
e = C("e")
f = D("f")
a = E("a")
b = F("b")
k = G("k")
h = H("h")
d = A("d")
c = E("c")

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