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

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.o: D = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.p: C = None
        self.y: E = None
        self.z: F = None
        self.s: A = None
        self.t: D = None
        self.o: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.o: D = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.p: C = None
        self.y: E = None
        self.z: F = None
        self.s: A = None
        self.t: D = None
        self.o: F = None
        self.txt = txt

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

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