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

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

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

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

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

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

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

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

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

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

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

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

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