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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: F = None
        self.u: A = None
        self.y: G = None
        self.v: G = None
        self.z: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: F = None
        self.y: B = None
        self.u: F = None
        self.t: A = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: F = None
        self.u: A = None
        self.y: G = None
        self.v: G = None
        self.z: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: F = None
        self.y: B = None
        self.u: F = None
        self.t: A = None
        self.txt = txt

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

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