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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.x: D = None
        self.r: A = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.o: C = None
        self.z: C = None
        self.v: A = None
        self.s: D = None
        self.p: B = None
        self.q: E = None
        self.r: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: H = None
        self.t: A = None
        self.z: D = None
        self.x: B = None
        self.v: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: C = None
        self.x: A = None
        self.t: A = None
        self.u: F = None
        self.q: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.x: D = None
        self.r: A = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.o: C = None
        self.z: C = None
        self.v: A = None
        self.s: D = None
        self.p: B = None
        self.q: E = None
        self.r: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: H = None
        self.t: A = None
        self.z: D = None
        self.x: B = None
        self.v: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: C = None
        self.x: A = None
        self.t: A = None
        self.u: F = None
        self.q: A = None
        self.txt = txt

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

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