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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: D = None
        self.y: A = None
        self.p: A = None
        self.w: H = None
        self.o: G = None
        self.t: G = None
        self.z: D = None
        self.u: A = None
        self.txt = txt

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

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

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: D = None
        self.y: A = None
        self.p: A = None
        self.w: H = None
        self.o: G = None
        self.t: G = None
        self.z: D = None
        self.u: A = None
        self.txt = txt

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

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

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

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