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

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

class C:
    def __init__(self, txt: str):
        self.o: D = None
        self.u: F = None
        self.w: B = None
        self.s: H = None
        self.t: D = None
        self.x: H = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.z: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: F = None
        self.w: G = None
        self.q: B = None
        self.o: B = None
        self.r: C = None
        self.u: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: D = None
        self.u: F = None
        self.w: B = None
        self.s: H = None
        self.t: D = None
        self.x: H = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.z: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: F = None
        self.w: G = None
        self.q: B = None
        self.o: B = None
        self.r: C = None
        self.u: A = None
        self.txt = txt

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

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