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

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

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

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.s: E = None
        self.y: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.s: H = None
        self.w: C = None
        self.v: C = None
        self.r: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.s: E = None
        self.y: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.s: H = None
        self.w: C = None
        self.v: C = None
        self.r: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

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

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

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