class A:
    def __init__(self, txt: str):
        self.p: H = None
        self.y: E = None
        self.z: E = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.x: G = None
        self.o: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: B = None
        self.w: A = None
        self.s: B = None
        self.txt = txt

e = A("e")
i = B("i")
c = C("c")
l = D("l")
a = E("a")
g = F("g")
h = G("h")
b = H("b")

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.x: G = None
        self.o: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: B = None
        self.w: A = None
        self.s: B = None
        self.txt = txt

e = A("e")
i = B("i")
c = C("c")
l = D("l")
a = E("a")
g = F("g")
h = G("h")
b = H("b")

e.p = b
e.y = a
e.z = a
i.t = a
i.y = b
i.s = h
i.z = e
c.r = h
c.v = a
l.o = c
a.z = h
a.w = i
g.r = i
g.x = h
g.o = a
h.o = i
h.t = b
h.y = g
b.x = i
b.s = i
b.w = e
assert i.s.y.o.z.y.r.txt == "i"