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

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

class C:
    def __init__(self, txt: str):
        self.q: A = None
        self.v: D = None
        self.w: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.w: F = None
        self.z: A = None
        self.v: D = None
        self.u: A = None
        self.s: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

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

e = A("e")
g = B("g")
d = C("d")
l = D("l")
n = E("n")
k = F("k")
m = G("m")
b = E("b")
a = C("a")
f = B("f")

e.q = g
e.x = g
e.y = f
e.o = m
e.z = d
g.x = k
g.o = n
g.s = f
g.p = f
g.t = f
g.z = d
g.y = d
d.q = e
d.v = l
d.w = l
l.r = k
l.u = m
l.o = m
l.t = d
n.x = g
n.w = k
n.z = e
n.u = e
n.v = l
n.s = d
k.s = l
m.t = g
b.x = g
b.w = k
b.z = e
b.u = e
b.v = l
b.s = d
a.q = e
a.v = l
a.w = l
f.x = k
f.o = b
f.s = g
f.p = g
f.t = g
f.z = d
f.y = a
assert e.z.v.r.s.t.q.z.v.t.txt == "
class A:
    def __init__(self, txt: str):
        self.q: B = None
        self.y: B = None
        self.x: B = None
        self.o: G = None
        self.z: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: A = None
        self.v: D = None
        self.w: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.w: F = None
        self.z: A = None
        self.v: D = None
        self.u: A = None
        self.s: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

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

e = A("e")
g = B("g")
d = C("d")
l = D("l")
n = E("n")
k = F("k")
m = G("m")
b = E("b")
a = C("a")
f = B("f")

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