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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.z: F = None
        self.q: E = None
        self.y: A = None
        self.w: D = None
        self.r: D = None
        self.v: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: H = None
        self.u: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.v: B = None
        self.y: B = None
        self.u: D = None
        self.z: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.z: F = None
        self.q: E = None
        self.y: A = None
        self.w: D = None
        self.r: D = None
        self.v: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: H = None
        self.u: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.v: B = None
        self.y: B = None
        self.u: D = None
        self.z: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

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

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