class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.v: G = None
        self.u: H = None
        self.s: H = None
        self.txt = txt

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.p: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: A = None
        self.s: E = None
        self.v: G = None
        self.u: A = None
        self.txt = txt

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.p: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: A = None
        self.s: E = None
        self.v: G = None
        self.u: A = None
        self.txt = txt

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

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