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

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.w: D = None
        self.o: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: A = None
        self.o: F = None
        self.t: A = None
        self.y: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.t: E = None
        self.w: A = None
        self.txt = txt

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

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

e.v = b
e.z = g
i.x = d
i.w = g
i.o = j
a.q = e
a.t = e
a.y = e
a.o = j
g.p = j
g.x = j
f.q = j
f.x = j
f.s = g
f.z = a
f.t = a
f.y = b
j.t = f
j.w = e
n.x = i
n.q = a
b.v = e
b.z = g
l.x = i
l.q = a
d.x = i
d.q = a
assert l.x.w.x.t.z.o.t.x.t.q.txt == "
class A:
    def __init__(self, txt: str):
        self.v: A = None
        self.z: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.w: D = None
        self.o: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: A = None
        self.o: F = None
        self.t: A = None
        self.y: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.t: E = None
        self.w: A = None
        self.txt = txt

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

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

e.v = b
e.z = g
i.x = d
i.w = g
i.o = j
a.q = e
a.t = e
a.y = e
a.o = j
g.p = j
g.x = j
f.q = j
f.x = j
f.s = g
f.z = a
f.t = a
f.y = b
j.t = f
j.w = e
n.x = i
n.q = a
b.v = e
b.z = g
l.x = i
l.q = a
d.x = i
d.q = a
assert l.x.w.x.t.z.o.t.x.t.q.txt == "j"