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

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: D = None
        self.x: C = None
        self.z: B = None
        self.w: D = None
        self.txt = txt

j = A("j")
e = B("e")
m = C("m")
i = D("i")
a = E("a")
b = F("b")
n = C("n")
k = C("k")
g = A("g")

j.x = g
j.v = i
j.s = a
e.y = i
m.r = b
m.x = b
m.y = j
m.v = k
m.z = a
i.x = e
i.y = b
i.s = k
a.u = n
b.q = i
b.w = i
b.x = n
b.z = e
n.r = b
n.x = b
n.y = j
n.v = k
n.z = a
k.r = b
k.x = b
k.y = j
k.v = n
k.z = a
g.x = j
g.v = i
g.s = a
assert i.y.z.y.y.z.y.y.z.txt == "
class A:
    def __init__(self, txt: str):
        self.x: A = None
        self.v: D = None
        self.s: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: D = None
        self.x: C = None
        self.z: B = None
        self.w: D = None
        self.txt = txt

j = A("j")
e = B("e")
m = C("m")
i = D("i")
a = E("a")
b = F("b")
n = C("n")
k = C("k")
g = A("g")

j.x = g
j.v = i
j.s = a
e.y = i
m.r = b
m.x = b
m.y = j
m.v = k
m.z = a
i.x = e
i.y = b
i.s = k
a.u = n
b.q = i
b.w = i
b.x = n
b.z = e
n.r = b
n.x = b
n.y = j
n.v = k
n.z = a
k.r = b
k.x = b
k.y = j
k.v = n
k.z = a
g.x = j
g.v = i
g.s = a
assert i.y.z.y.y.z.y.y.z.txt == "e"