class A:
    def __init__(self, txt: str):
        self.z: G = None
        self.t: H = None
        self.w: G = None
        self.s: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: C = None
        self.y: G = None
        self.u: B = None
        self.v: A = None
        self.s: E = None
        self.o: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: C = None
        self.y: G = None
        self.u: B = None
        self.v: A = None
        self.s: E = None
        self.o: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.txt = txt

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

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

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

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

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